//
//  SpecialViewCell.m
//  Coco_Music
//
//  Created by dlios on 15-6-27.
//  Copyright (c) 2015年 寇广超. All rights reserved.
//

#import "SpecialViewCell.h"

@implementation SpecialViewCell
-(void)dealloc
{
    [_SpecoalD release];
    [_myIndexPath release];
    [_numberLabel release];
    [_songLabel release];
    [_singerLabel release];
    [super dealloc];
    
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self =[super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createSubViews];
    }
    return self;
}
-(void)createSubViews
{
    UIButton *button =[[UIButton alloc]initWithFrame:CGRectMake(10, 10, 40, 40)];
    button.backgroundColor =[UIColor clearColor];
    [self addSubview:button];
    
    self.numberLabel =[[UILabel alloc]initWithFrame:CGRectMake(button.frame.origin.x+button.frame.size.width+10, button.frame.origin.y/2, 20, 40)];
    
    [self addSubview:self.numberLabel];
    [_numberLabel release];
    
    self.songLabel =[[UILabel alloc]initWithFrame:CGRectMake(self.numberLabel.frame.size.width+self.numberLabel.frame.origin.x, self.numberLabel.frame.origin.y, 200, 40)];
    self.songLabel.textColor =[UIColor blackColor];
    
    [self addSubview:self.songLabel];
    [_songLabel release];
    
    self.singerLabel =[[UILabel alloc]initWithFrame:CGRectMake(self.numberLabel.frame.origin.x+10, self.songLabel.frame.origin.y+self.songLabel.frame.size.height, 200, 40)];
    self.singerLabel.font =[UIFont systemFontOfSize:15];
    self.singerLabel.textColor =[UIColor blackColor];
    [self addSubview:self.singerLabel];
    [_singerLabel release];

    
    
}
-(void)setSpecoalD:(SpecialDetail *)SpecoalD
{
    if (_SpecoalD != SpecoalD) {
        [ _SpecoalD release];
        _SpecoalD =[SpecoalD retain];
        
    }
    self.songLabel.text = SpecoalD.song_name;
    self.singerLabel.text = SpecoalD.singer_name;
    
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
